此函数用来获得视野矩阵。此函数所返回的矩阵ID可用在其它的 矩阵函数 ,或用来设置其它摄像机的投影矩阵。(使用 camera_set_proj_mat)。注意,此函数通常用于那些使用camera_create()创建出来的摄像机,但也可用于那些在房间编辑器中(或使用 camera_create_view)创建出来的摄像机——在这种情况下,只有在给定摄像机在首次被用于可视区域时,函数返回的矩阵才可用。
camera_get_view_mat(camera_id)
参数 描述 camera_id 创建相机时返回的唯一相机 id 值
Matrix ID (real)
mat = camera_get_view_mat(camera_view[0]);
The above code gets the view matrix for the camera assigned to view port[0].